<#include "./base/basic-page.ftl">
<#include "./common/table.ftl">
<#include "./common/modal.ftl">
<#include "./common/form.ftl">
<@page_head>
    <style type="text/css">
        .navbar .container-fluid{
            margin: 0 auto;
            width: 60%;
        }
        .be-right-navbar .be-user-nav{
            display: none;
        }
        .user-info-list table tr td.item{
            width: 10%!important;
        }
        .user-info-list{
            padding:15px 15px 35px 36px!important;
        }
        .pay-way_w{
            padding-left: 0!important;
        }
        .pay-way_w .custom-radio{
             margin-top: 0;
             margin-bottom: 0;
        }
        .pay-btn-space{
            margin: 10px 0;
        }
        .pay-btn-space button{
            background: #e57a39!important;
            padding: 0 5%;
            border: 0!important;
            box-shadow: none!important;
        }
        .pay-btn-space button:hover{
            background: #e57a39!important;
            box-shadow: none!important;
            border: 0!important;
        }
        .pay-btn-space button:active{
            background: #e57a39!important;
            box-shadow: none!important;
            border: 0!important;
        }
        .pay-btn-space button:visited{
            background: #e57a39!important;
            box-shadow: none!important;
            border: 0!important;
        }
    </style>
</@page_head>
<@page_body
    site_bar_enable=false
    site_logo='/static/img/img_site_logo_pay.png'
    page_title=""
    side_active="/admin/system/menu"
>
    <div class="main-content container-fluid" style="padding-top: 55px;">
        <div class="center_w" style="width: 60%;">
            <div class="row">
                <!--Responsive table-->
                <div class="col-sm-12">
                    <div class="card card-default">
                        <div class="card-header">
                                <span class="title">
                                    订单信息
                                </span>
                        </div>

                        <form id="payment">
                        <input type="hidden" name="order_num" value="${order.num}">
                        <div class="user-info-list card-body">
                            <table class="no-border no-strip skills">
                                <tbody class="no-border-x no-border-y">
                                <tr>
                                    <td class="icon">
                                        <span class="mdi mdi-case"></span>
                                    </td>
                                    <td class="item">
                                        订单编号：
                                    </td>
                                    <td>${order.num}</td>
                                </tr>
                                <tr>
                                    <td class="icon">
                                        <span class="mdi mdi-label"></span>
                                    </td>
                                    <td class="item">
                                        商品名称：
                                    </td>
                                    <td>${order.goodsName}</td>
                                </tr>
                                <tr>
                                    <td class="icon">
                                        <span class="mdi mdi-store"></span>
                                    </td>
                                    <td class="item">
                                        商户名称：
                                    </td>
                                    <td>${order.merchName}</td>
                                </tr>
                                <tr>
                                    <td class="icon">
                                        <span class="mdi mdi-shopping-cart"></span>
                                    </td>
                                    <td class="item">订单金额：</td>
                                    <td>${order.money?string["0.00"]}元</td>
                                </tr>
                                <tr>
                                <td class="icon">
                                    <span class="mdi mdi-shopping-cart"></span>
                                </td>
                                <td class="item">订单状态：</td>
                                    <td>
                                        <#switch order.state>
                                            <#case 1>
                                                支付成功
                                                <#break>
                                            <#case 2>
                                                交易完成
                                                <#break>
                                        </#switch>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</@page_body>
<@page_foot site_bar_enable=true>
    <div class="modal fade" id="mod-wechat" tabindex="-1" role="dialog" style="display: none;" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" type="button" data-dismiss="modal" aria-hidden="true"><span class="mdi mdi-close"></span></button>
                </div>
                <div class="modal-body">
                    <div class="text-center">
                        <#--<div class="text-success"><span class="modal-main-icon mdi mdi-check"></span></div>-->
                        <div class="qrcode_w">
                        </div>
                        <h3>微信支付-￥${order.money?string['0.00']}元</h3>
                        <p>请打开「手机微信」扫描屏幕上的二维码进行付款</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="mod-alipay" tabindex="-1" role="dialog" style="display: none;" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" type="button" data-dismiss="modal" aria-hidden="true"><span class="mdi mdi-close"></span></button>
                </div>
                <div class="modal-body">
                    <div class="text-center">
                        <#--<div class="text-success"><span class="modal-main-icon mdi mdi-check"></span></div>-->
                        <div class="qrcode_a">
                        </div>
                        <h3>支付宝付款-￥${order.money?string['0.00']}元</h3>
                        <p>请打开「手机支付宝」扫描屏幕上的二维码进行付款</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
<script src="/static/lib/parsley/parsley.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function(){
        //initialize the javascript
        var cli = new S7BuyCli();
        cli.init();
        cli.initOrderInfo({orderNum:'${order.num}',returnUrl:'${returnUrl!''}'});
        // cli.initGoodsGroup();
    });
</script>
</@page_foot>